//
//  OABaseModel.m
//  OA
//
//  Created by Guo Rui on 2017/12/4.
//  Copyright © 2017年 GR Harry. All rights reserved.
//

#import "OABaseModel.h"
#import <YYModel/YYModel.h>

@implementation OABaseModel

// YYModel
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    return [self yy_modelInitWithCoder:aDecoder];
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    return [self yy_modelEncodeWithCoder:aCoder];
}

- (id)copyWithZone:(NSZone *)zone
{
    return [self yy_modelCopy];
}

+ (instancetype)modelWithDict:(NSDictionary *)dict
{
    return [self yy_modelWithDictionary:dict];
}

+ (NSArray *)modelWithArray:(NSArray<NSDictionary *> *)array
{
    NSMutableArray *arrayM = [NSMutableArray arrayWithCapacity:0];
    for (NSDictionary *dict in array) {
        [arrayM addObject:[self modelWithDict:dict]];
    }
    return arrayM.copy;
}
@end
